package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Menu;
import com.itheima.pojo.Permission;
import com.itheima.pojo.Role;
import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserDao {
    public User findByUsername(String username);

    public Page<User> selectByCondition(String queryString);

    public void add(User user);

    public void setUserAndRole(Map map);

    public User findById(Integer id);

    public List<Integer> findRoleIdsByUserId(Integer id);

    public void deleteAssocication(Integer id);

    public void edit(User user);

    public void deleteRelation(Integer id);

    public void delete(Integer id);

    public List<Menu> findMenuByUsername(String username);
    public List<Menu> findMenu(@Param("id") Integer id, @Param("username") String username);
}
